Help:Displaying a formula
MediaWiki uses a subset of AMS-LaTeX markup, a superset of LaTeX markup which is in turn a superset of TeX markup, for mathematical formulae. It generates either PNG images or simple HTML markup, depending on and the complexity of the expression. In the future, as more browsers become smarter, it will be able to generate enhanced HTML or even MathML in many cases. (See blahtex for information about current work on adding MathML support.) Although, in all cases mentioned, TeX is generated by compilation, and not by an Interpreter program, there is one essential difference between, e.g., Knuth's TeX or Lamport's LaTeX and the present implementation: whereas in the first two cases the compiler typically generates an all-in-one printable output, which has the quality of a whole book with all chapters, sections and subsections, and where no line is "special", in the present case one has, typically, a mixture of TeX images (more precisely: PNG images) for the equations, imbedded into usual text, and with short TeX elements usually replaced by html parts. As a consequence, in many cases TeX-elements, e.g. vector symbols, "stick out" below (or above) the text line. This "sticking out" is not the case in the above-mentioned original products, and the html-substitutes for small TeX additions to the text are often insufficient in quality for many readers. In spite of these shortcomings, the present product characterized by "many imbedded PNG-images" should be peferred for small texts, where the equations do not dominate. More precisely, MediaWiki filters the markup through Texvc, which in turn passes the commands to TeX for the actual rendering. Thus, only a limited part of the full TeX language is supported; see below for details. To have math rendered in a particular MediaWiki installation, one has to set $wgUseTeX = true; in LocalSettings.php. __TOC__ Technicals Syntax Math markup goes inside ... . The has a button for this. Similar to HTML, in TeX extra spaces and newlines are ignored. The TeX code has to be put literally: MediaWiki templates, predefined templates, and parameters cannot be used within math tags: pairs of double braces are ignored and "#" gives an error message. However, math tags work in the then and else part of #if, etc. See for more information. Rendering The PNG images are black on white (not transparent). These colors, as well as font sizes and types, are independent of browser settings or CSS. Font sizes and types will often deviate from what HTML renders. Vertical alignment with the surrounding text can also be a problem. The of the images is img.tex. It should be pointed out that solutions to most of these shortcomings have been proposed by Maynard Handley, but have not been implemented yet. The alt text of the PNG images, which is displayed to visually impaired and other readers who cannot see the images, defaults to the wikitext that produced the image, excluding the and . You can override this by explicitly specifying an alt attribute for the math element. For example, \sqrt{\pi} generates an image \sqrt{\pi} whose alt text is "Square root of pi". Apart from function and operator names, as is customary in mathematics, variables and letters are in italics; digits are not. For other text, (like variable labels) to avoid being rendered in italics like variables, use \text, \mbox, or \mathrm. For example, \text{abc} gives \text{abc} . This does not work for special characters; they are ignored unless the whole expression is rendered in HTML: * \text {abcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ} * \text {abcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ}\,\! gives: * \text {abcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ} * \text {abcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ}\,\! TeX vs HTML Before introducing TeX markup for producing special characters, it should be noted that, as this comparison table shows, sometimes similar results can be achieved in HTML (see ). The codes on the left produce the symbols on the right, but the latter can also be put directly in the wikitext, except for ‘=’. α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω ∫ ∑ ∏ √ − ± ∞ ≈ ∝ ≡ ≠ ≤ ≥ × · ÷ ∂ ′ ″ ∇ ‰ ° ∴ Ø ø ∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇ ¬ ∧ ∨ ∃ ∀ ⇒ ⇔ → ↔ ↑ ℵ - – — ∫ ∑ ∏ √ − ± ∞ ≈ ∝ = ≡ ≠ ≤ ≥ × · ÷ ∂ ′ ″ ∇ ‰ ° ∴ Ø ø ∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇ ¬ ∧ ∨ ∃ ∀ ⇒ ⇔ → ↔ ↑ ℵ - – — The project has settled on both HTML and TeX because each has advantages in some situations. Pros of HTML # Formulas in HTML behave more like regular text. In-line HTML formulae always align properly with the rest of the HTML text and, to some degree, can be cut-and-pasted. The formula’s background and font size match the rest of HTML contents and the appearance respects CSS and browser settings while the typeface is conveniently altered to help you identify formulae. The display of a formula entered using mathematical templates can be conveniently altered by modifying the templates involved; this modification will affect all relevant formulae without any manual intervention. Formulae typeset with HTML code will be accessible to client-side script links (a.k.a. scriptlets). # Pages using HTML code for formulae will load faster. # The HTML code, if entered diligently, will contain all semantic information to transform the equation back to TeX or any other code as needed. It can even contain differences TeX does not normally catch, e.g. for the imaginary unit and for an arbitrary index variable. Pros of TeX # TeX is semantically more precise than HTML. ## In TeX, " x" means "mathematical variable x ", whereas in HTML "x" is generic and somewhat ambiguous. ## On the other hand, if you encode the same formula as " ", you get the same visual result and no information is lost. This requires diligence and more typing that could make the formula harder to understand as you type it. However, since there are far more readers than editors, this effort is worth considering. #: One consequence of this is that TeX code can be transformed into HTML, but not vice-versa. This means that on the server side we can always transform a formula, based on its complexity and location within the text, user preferences, type of browser, etc. Therefore, where possible, all the benefits of HTML can be retained, together with the benefits of TeX. It is true that the current situation is not ideal, but that is not a good reason to drop information/contents. It is more a reason to help improve the situation. Another consequence of this is that TeX can be converted to MathML for browsers which support it, thus keeping its semantics and allowing the rendering to be better suited for the reader’s graphic device. # TeX is the preferred text formatting language of most professional mathematicians, scientists, and engineers. It is easier to persuade them to contribute if they can write in TeX. TeX has been specifically designed for typesetting formulae, so input is easier and more natural if you are accustomed to it, and output is more aesthetically pleasing if you focus on a single formula rather than on the whole containing page. Once a formula is done correctly in TeX, it will render reliably, whereas the success of HTML formulae is somewhat dependent on browsers or versions of browsers. Another aspect of this dependency is fonts: the serif font used for rendering formulae is browser-dependent and it may be missing some important glyphs. While browsers are generally able to substitute a matching glyph from a different font family, this may not work for combined glyphs (compare ‘ ’ and ‘ a̅ ’). # TeX formulae, by default, render larger and are usually more readable than HTML formula and are not dependent on client-side browser resources, such as fonts, and so the results are more reliably WYSIWYG. # While TeX does not assist you in finding HTML codes or Unicode values (which you can obtain by viewing the HTML source in your browser), cutting and pasting from a TeX PNG in Wikipedia into simple text will return the LaTeX source. : unless your wikitext follows the style of point 1.2 : The entity support problem is not limited to mathematical formulae though; it can be easily solved by using the corresponding characters instead of entities, as the character repertoire links do, except for cases where the corresponding glyphs are visually indiscernible (e.g. – for ‘–’ and − for ‘−’). In some cases it may be the best choice to use neither TeX nor the html-substitutes, but instead the simple ASCII symbols of a standard keyboard (see below, for an example). Functions, symbols, special characters For a little more semantics on these symbols, see the brief TeX Cookbook. Larger expressions Subscripts, superscripts, integrals Fractions, matrices, multilines Feature Syntax How it looks rendered Fractions \frac{2}{4}=0.5 \frac{2}{4}=0.5 Small fractions \tfrac{2}{4} = 0.5 \tfrac{2}{4} = 0.5 Large (normal) fractions \dfrac{2}{4} = 0.5 \qquad \dfrac{2}{c + \dfrac{2}{d + \dfrac{2}{4}}} = a \dfrac{2}{4} = 0.5 \qquad \dfrac{2}{c + \dfrac{2}{d + \dfrac{2}{4}}} = a Large (nested) fractions \cfrac{2}{c + \cfrac{2}{d + \cfrac{2}{4}}} = a \cfrac{2}{c + \cfrac{2}{d + \cfrac{2}{4}}} = a Binomial coefficients \binom{n}{k} \binom{n}{k} Small binomial coefficients \tbinom{n}{k} \tbinom{n}{k} Large (normal) binomial coefficients \dbinom{n}{k} \dbinom{n}{k} Matrices \begin{matrix} x & y \\ z & v \end{matrix} \begin{matrix} x & y \\ z & v \end{matrix} \begin{vmatrix} x & y \\ z & v \end{vmatrix} \begin{vmatrix} x & y \\ z & v \end{vmatrix} \begin{Vmatrix} x & y \\ z & v \end{Vmatrix} \begin{Vmatrix} x & y \\ z & v \end{Vmatrix} \begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0 \end{bmatrix} \begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0\end{bmatrix} \begin{Bmatrix} x & y \\ z & v \end{Bmatrix} \begin{Bmatrix} x & y \\ z & v \end{Bmatrix} \begin{pmatrix} x & y \\ z & v \end{pmatrix} \begin{pmatrix} x & y \\ z & v \end{pmatrix} \bigl( \begin{smallmatrix} a&b\\ c&d \end{smallmatrix} \bigr) \bigl( \begin{smallmatrix} a&b\\ c&d \end{smallmatrix} \bigr) Case distinctions f(n) = \begin{cases} n/2, & \mbox{if }n\mbox{ is even} \\ 3n+1, & \mbox{if }n\mbox{ is odd} \end{cases} f(n) = \begin{cases} n/2, & \mbox{if }n\mbox{ is even} \\ 3n+1, & \mbox{if }n\mbox{ is odd} \end{cases} Multiline equations \begin{align} f(x) & = (a+b)^2 \\ & = a^2+2ab+b^2 \\ \end{align} \begin{align} f(x) & = (a+b)^2 \\ & = a^2+2ab+b^2 \\ \end{align} \begin{alignat}{2} f(x) & = (a-b)^2 \\ & = a^2-2ab+b^2 \\ \end{alignat} \begin{alignat}{2} f(x) & = (a-b)^2 \\ & = a^2-2ab+b^2 \\ \end{alignat} Multiline equations (must define number of colums used ({lcr}) (should not be used unless needed) \begin{array}{lcl} z & = & a \\ f(x,y,z) & = & x + y + z \end{array} \begin{array}{lcl} z & = & a \\ f(x,y,z) & = & x + y + z \end{array} Multiline equations (more) \begin{array}{lcr} z & = & a \\ f(x,y,z) & = & x + y + z \end{array} \begin{array}{lcr} z & = & a \\ f(x,y,z) & = & x + y + z \end{array} Breaking up a long expression so that it wraps when necessary, at the expense of destroying correct spacing f(x) \,\! = \sum_{n=0}^\infty a_n x^n = a_0+a_1x+a_2x^2+\cdots f(x) \,\! = \sum_{n=0}^\infty a_n x^n = a_0 +a_1x+a_2x^2+\cdots Simultaneous equations \begin{cases} 3x + 5y + z \\ 7x - 2y + 4z \\ -6x + 3y + 2z \end{cases} \begin{cases} 3x + 5y + z \\ 7x - 2y + 4z \\ -6x + 3y + 2z \end{cases} Arrays \begin{array} a & b & S \\ \hline 0&0&1\\ 0&1&1\\ 1&0&1\\ 1&1&0\\ \end{array} \begin{array} a & b & S \\ \hline 0&0&1\\ 0&1&1\\ 1&0&1\\ 1&1&0\\ \end{array} Parenthesizing big expressions, brackets, bars You can use various delimiters with \left and \right: Equation numbering The templates and can be used to number equations. The template can be used to refer to a numbered equation from surrounding text. For example, the following syntax: : }} produces the following result (note the equation number in the right margin): }} Later on, the text can refer to this equation by its number using syntax like this: :As seen in equation ( ), blah blah blah... The result looks like this: :As seen in equation ( ), blah blah blah... Note that the equation number produced by is a link that the user can click to go immediately to the cited equation. Alphabets and typefaces Texvc cannot render arbitrary Unicode characters. Those it can handle can be entered by the expressions below. For others, such as Cyrillic, they can be entered as Unicode or HTML entities in running text, but cannot be used in displayed formulas. Mixed text faces Color Equations can use color: *{\color{Blue}x^2}+{\color{YellowOrange}2x}-{\color{OliveGreen}1} *: {\color{Blue}x^2}+{\color{YellowOrange}2x}-{\color{OliveGreen}1} *x_{1,2}=\frac{-b\pm\sqrt{\color{Red}b^2-4ac}}{2a} *: x_{1,2}=\frac{-b\pm\sqrt{\color{Red}b^2-4ac}}{2a} See here for all named colors supported by LaTeX. Note that color should not be used as the only way to identify something, because it will become meaningless on black-and-white media or for color-blind people. See Wikipedia:Manual of Style#Color coding. Formatting issues Spacing Note that TeX handles most spacing automatically, but you may sometimes want manual control. Automatic spacing may be broken in very long expressions (because they produce an overfull hbox in TeX): : 0+1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+\cdots : 0+1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+\cdots This can be remedied by putting a pair of braces { } around the whole expression: : {0+1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+\cdots} : {0+1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+\cdots} Alignment with normal text flow Due to the default CSS img.tex { vertical-align: middle; } an inline expression like \int_{-N}^{N} e^x\, dx should look good. If you need to align it otherwise, use ... and play with the vertical-align argument until you get it right. However, how it looks may depend on the browser and the browser settings. Also note that if you rely on this workaround, if/when the rendering on the server gets fixed in future releases, as a result of this extra manual offset your formulae will suddenly be aligned incorrectly. So use it sparingly, if at all. Forced PNG rendering To force the formula to render as PNG, add \, (small space) at the end of the formula (where it is not rendered). This will force PNG if the user is in "HTML if simple" mode, but not for "HTML if possible" mode (math rendering settings in ). You can also use \,\! (small space and negative space, which cancel out) anywhere inside the math tags. This does force PNG even in "HTML if possible" mode, unlike \,. This could be useful to keep the rendering of formulae in a proof consistent, for example, or to fix formulae that render incorrectly in HTML (at one time, a^{2+2} rendered with an extra underscore), or to demonstrate how something is rendered when it would normally show up as HTML (as in the examples above). For instance: Syntax How it looks rendered a^{c+2} a^{c+2} a^{c+2} \, a^{c+2} \, a^{\,\!c+2} a^{\,\!c+2} a^{b^{c+2}} a^{b^{c+2}} (WRONG with option "HTML if possible or else PNG"!) a^{b^{c+2}} \, a^{b^{c+2}} \, (WRONG with option "HTML if possible or else PNG"!) a^{b^{c+2}}\approx 5 a^{b^{c+2}}\approx 5 (due to " \approx " correctly displayed, no code "\,\!" needed) a^{b^{\,\!c+2}} a^{b^{\,\!c+2}} \int_{-N}^{N} e^x\, dx \int_{-N}^{N} e^x\, dx This has been tested with most of the formulae on this page, and seems to work perfectly. You might want to include a comment in the HTML so people don't "correct" the formula by removing it: :' Commutative diagrams To make a commutative diagram, there are three steps: # write the diagram in TeX # convert to SVG # upload the file to Wikimedia Commons Diagrams in TeX Xy-pic (online manual) is the most powerful and general-purpose diagram package in TeX. Simpler packages include: * AMS's amscd * Paul Taylor's diagrams * François Borceux Diagrams The following is a template for Xy-pic, together with a hack to increase the margins in dvips, so that the diagram is not truncated by over-eager cropping (suggested in TUGboat: TUGboat, Volume 17 1996, No. 3): \documentclass{amsart} \usepackageps, dvips{xy} % Loading the XY-Pic package % Using postscript driver for smoother curves \usepackage{color} % For invisible frame \begin{document} \thispagestyle{empty} % No page numbers \SelectTips{eu}{} % Euler arrowheads (tips) \setlength{\fboxsep}{0pt} % Frame box margin {\color{white}\framebox } % end math, end frame \end{document} Convert to SVG Once you have produced your diagram in LaTeX (or TeX), you can convert it to an SVG file using the following sequence of commands: pdflatex file.tex pdfcrop --clip file.pdf tmp.pdf pdf2svg tmp.pdf file.svg (rm tmp.pdf at the end) If you do not have pdflatex (which is unlikely) you can also use the commands latex file.tex dvipdfm file.dvi to get a PDF version of your diagram. The pdfcrop and pdf2svg utilities are needed for this procedure. In general, you will not be able to get anywhere with diagrams without TeX and Ghostscript, and the inkscape program is a useful tool for creating or modifying your diagrams by hand. There is also a utility pstoedit which supports direct conversion from Postscript files to many vector graphics formats, but it requires a non-free plugin to convert to SVG, and regardless of the format, this editor has not been successful in using it to convert diagrams with diagonal arrows from TeX-created files. These programs are: * a working TeX distribution, such as TeX Live * Ghostscript * pstoedit * Inkscape Upload the file As the diagram is your own work, upload it to Wikimedia Commons, so that all projects (notably, all languages) can use it without having to copy it to their language's Wiki. (If you've previously uploaded a file to somewhere other than Commons, to Commons.) ;Check size: Before uploading, check that the default size of the image is neither too large nor too small by opening in an SVG application and viewing at default size (100% scaling), otherwise adjust the -y option to dvips. ;Name: Make sure the file has a meaningful name. ;Upload: Login to Wikimedia Commons, then upload the file; for the '''Summary, give a brief description. Now go to the and add a description, including the source code, using this template: |Source=Created as per: en:meta:Help:Displaying a formula#Commutative diagrams % TeX source here |Date = The Creation Date, like 1999-12-31 |Author = Your Real Name |Permission = }} Category:Commutative diagrams ;Source code: * Include the source code in the , in the Source section of the Information template, so that the diagram can be edited in future. * Include the complete .tex file, not just the fragment, so future editors do not need to reconstruct a compilable file. * (Don't include it in the Summary section, which is just supposed to be a summary.) ;License: The most common license for commutative diagrams is PD-self; some use PD-ineligible, especially for simple diagrams, or other licenses. Please do not use the GFDL, as it requires the entire text of the GFDL to be attached to any document that uses the diagram. ;Description: If possible, link to a Wikipedia page relevant to the diagram. ;Category: Include Category:Commutative diagrams, so that it appears in commons:Category:Commutative diagrams. There are also subcategories, which you may choose to use. ;Include image: Now include the image on the original page via Examples A sample conforming diagram is commons:Image:PSU-PU.svg. Not implemented elements, and warnings \oiint and \oiiint To the unimplemented elements, or better: not-yet implemented ones, belongs \oiint (see below), i.e. a two-fold integral \iint ( \iint ), additionally with some kind of circular surface covering the center of the two integrals. This element would appear in many contexts (requiring integration over a curved surface within a space of larger dimension), and would be a strong candidate for the next TeX version, e.g. it would appear in Maxwell's equations. Thus, in the present version, there are a lot of workarounds, for example : \iint_{\partial V}\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\;\;\;\subset\!\supset \mathbf D\;\cdot\mathrm{d}\mathbf A which uses \iint along with \subset and \supset (overdrawn after backspacing), or : \int\!\!\!\!\int_{\partial V}\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\;\;\;\bigcirc\,\,\mathbf D\;\cdot\mathrm{d}\mathbf A which uses \int twice (with some backward kerning) along with \bigcirc (also overdrawn after backpacing) which produces a more consistant circle. Three-fold curved integral symbol \oiiint (a variation of \iiint with an additional centered circle covering the three integrals, that should also be preferably more tightly kerned) are also commonly found in mathematics, physics and technical litterature (for integration over a curved volume within a space of larger dimension), it looks more or less like : \int\!\!\!\!\!\int\!\!\!\!\!\int_{\partial V}\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\;\;\;\bigcirc\,\,\mathbf D\;\cdot\mathrm{d}\mathbf A which uses three \int symbols (with more backward kerning) along with \bigcirc (also overdrawn after backpacing). However, since no standardisation exists as yet, any workaround like this (which uses many \! symbols for backspacing) should be avoided, if possible. In contrast, \oint ( \oint ) exists for the single dimension (integration over a curved line within a plane or any space with higher dimension). Note that \iint (the double integral) and \iiint (the triple integral) are still not kerned as they should preferably be, and are currently rendered as if they were successive \int symbols ; this is not a major problem for reading the formulas, even if the integral symbols before the last one do not have bounds, so it's best to avoid backspacing "hacks" as they may be inconsistent with a possible future better implementation of integrals symbols (with more precisely computed kerning positions). \phi and \varphi To the main symbols of TeX belong the elements "\phi" and "\varphi". With these elements, particularly with the use or non-use of the syllable "var", one should be particularly careful: * The letter "\varphi", as a PNG-image or in long equations, can be written as \varphi\! ; it looks as \varphi\! and is a standard name for azimuthal angles ; using Unicode, the correct Greek character to use in plain-text (preferably in italic style) would be U+03C6 (φ'') and is the standard letter "phi" of the Greek alphabet. * In contrast, "\phi" (also written as PNG-image by \phi\!) looks as \phi\! , and is the standard name ''not for angles, but for electric potentials, again in Maxwell's equations and in similar contexts ; using Unicode, the correct Greek character to use in plain-text (preferably in italic style) would be U+03D5 (ϕ'') and is an alternate representation of the letter, not used in Greek language but within scientific notations. Both are very important. However unfortunately, at present the HTML-representation for the last-mentioned potentials \phi\! is \phi , which reminds more to "\varphi" instead of "\phi", although this HTML-substitute is obtained by the same symbol \phi as before, but without the PNG-image-enforcing addition "\," (or better "\!"). Thus at present, due to this bug, and although generally one should not enforce PNG-images, for \phi an exception should be made. Enforcing PNG-images? Moreover, although for other symbols the html substitute does not show a similar bug, the corresponding text should be looked upon very critical, since the HTML-symbols, although not obviously wrong, may look rather ugly to some, so that an enforced PNG-image is often preferable. However, generally image-enforcing should be avoided. Often the best choice is to use neither TeX symbols nor the HTML substitutes, but instead the simple ASCII symbols offered by a standard keyboard: a good example is the quantity velocity, which might be given in TeX (if necessary with an enforcement) by v\! , with the HTML substitute v (which, by the way, should not be mixed up with the Greek letter "\nu" \nu\! ), and the ASCII letters ''v or V'' (i.e., one puts, at first, two primes for italic style, followed by the simple ASCII letter v or V, finally again two primes). For vector or tensor quantities, one can use again ASCII letters plus three primes for bold printing. Note also that the default HTML rendering of mathematic expressions (when they are possible) uses the default text font, weight, style and size for variable names. Some mathematic expressions need differences between these styles; for consistency with the more complex formulas using the same variables that can be rendered only as PNG, it may be necessary to enforce the PNG rendering also for isolated variables found in the article text (using one of the special TeX spaces that remain invisible on the left of right of the expression and that force the PNG rendering wherever they occur in the expression, notably the TeX backspace "\!"). Examples of implemented TeX formulas Quadratic polynomial ax^2 + bx + c = 0 ax^2 + bx + c = 0 Quadratic polynomial (force PNG rendering) ax^2 + bx + c = 0\,\! ax^2 + bx + c = 0\,\! Quadratic formula x={-b\pm\sqrt{b^2-4ac} \over 2a} x={-b\pm\sqrt{b^2-4ac} \over 2a} Tall parentheses and fractions 2 = \left( \frac{\left(3-x\right) \times 2}{3-x} \right) 2 = \left( \frac{\left(3-x\right) \times 2}{3-x} \right) S_{\text{new}} = S_{\text{old}} - \frac{ \left( 5-T \right) ^2} {2} S_{\text{new}} = S_{\text{old}} - \frac{ \left( 5-T \right) ^2} {2} Integrals \int_a^x \!\!\!\int_a^s f(y)\,dy\,ds = \int_a^x f(y)(x-y)\,dy \int_a^x \!\!\!\int_a^s f(y)\,dy\,ds = \int_a^x f(y)(x-y)\,dy Summation \sum_{m=1}^\infty\sum_{n=1}^\infty\frac{m^2\,n}{3^m\left(m\,3^n+n\,3^m\right)} \sum_{m=1}^\infty\sum_{n=1}^\infty\frac{m^2\,n} {3^m\left(m\,3^n+n\,3^m\right)} Differential equation u + p(x)u' + q(x)u=f(x),\quad x>a u'' + p(x)u' + q(x)u=f(x),\quad x>a Complex numbers |\bar{z}| = |z|, |(\bar{z})^n| = |z|^n, \arg(z^n) = n \arg(z) |\bar{z}| = |z|, |(\bar{z})^n| = |z|^n, \arg(z^n) = n \arg(z) Limits \lim_{z\rightarrow z_0} f(z)=f(z_0) \lim_{z\rightarrow z_0} f(z)=f(z_0) Integral equation \phi_n(\kappa) = \frac{1}{4\pi^2\kappa^2} \int_0^\infty \frac{\sin(\kappa R)}{\kappa R} \frac{\partial}{\partial R} \leftD_n(R)}{\partial R}\right\,dR \phi_n(\kappa) = \frac{1}{4\pi^2\kappa^2} \int_0^\infty \frac{\sin(\kappa R)}{\kappa R} \frac{\partial}{\partial R} \leftD_n(R)}{\partial R}\right\,dR Example \phi_n(\kappa) = 0.033C_n^2\kappa^{-11/3},\quad \frac{1}{L_0}\ll\kappa\ll\frac{1}{l_0} \phi_n(\kappa) = 0.033C_n^2\kappa^{-11/3},\quad \frac{1}{L_0}\ll\kappa\ll\frac{1}{l_0} Continuation and cases f(x) = \begin{cases}1 & -1 \le x < 0 \\ \frac{1}{2} & x = 0 \\ 1 - x^2 & \mbox{otherwise}\end{cases} f(x) = \begin{cases} 1 & -1 \le x < 0 \\ \frac{1}{2} & x = 0 \\ 1 - x^2 & \mbox{otherwise} \end{cases} Prefixed subscript {}_pF_q(a_1,\dots,a_p;c_1,\dots,c_q;z) = \sum_{n=0}^\infty \frac{(a_1)_n\cdots(a_p)_n}{(c_1)_n\cdots(c_q)_n}\frac{z^n}{n!} {}_pF_q(a_1,\dots,a_p;c_1,\dots,c_q;z) = \sum_{n=0}^\infty \frac{(a_1)_n\cdots(a_p)_n}{(c_1)_n\cdots(c_q)_n} \frac{z^n}{n!} Fraction and small fraction \frac{a}{b}\ \tfrac{a}{b} \frac{a}{b}\ \tfrac{a}{b} Area of a quadrilateral S=dD\,\sin\alpha\! S=S=dD\,\sin\alpha\! Volume of a sphere-stand V=\tfrac16\pi h\left3\left(r_1^2+r_2^2\right)+h^2\right V=\tfrac16\pi h\left3\left(r_1^2+r_2^2\right)+h^2\right See also *Typesetting of mathematical formulas *Proposed m:Music markup and *Table of mathematical symbols *mw:Extension:Blahtex, or blahtex: a LaTeX to MathML converter for Wikipedia *Wikipedia:Math Sandbox *commons:Category:Images which should use TeX External links *A LaTeX tutorial. *A paper introducing TeX—see page 39 onwards for a good introduction to the maths side of things. *A paper introducing LaTeX—skip to page 49 for the math section. See page 63 for a complete reference list of symbols included in LaTeX and AMS-LaTeX. *The Comprehensive LaTeX Symbol List—symbols not found here may be documented there. *AMS-LaTeX guide. *A set of public domain fixed-size math symbol bitmaps. *MathML: A product of the W3C Math working group, is a low-level specification for describing mathematics as a basis for machine to machine communication. Category:Wikipedia text help ca:Ajuda:Fórmula cs:Nápověda:Matematické vzorce de:Hilfe:TeX et:Vikipeedia:Matemaatiliste valemite kirjutamine es:Ayuda:Usando TeX eo:Helpo:TEX en Vikipedio fa:راهنما:فرمول‌نویسی fr:Aide:Formules TeX ia:Adjuta:Formulas TeX it:Aiuto:Formule matematiche TeX he:עזרה:נוסחאות nl:Help:TeX in Wikipedia km:ជំនួយ:រូបមន្ត pl:Pomoc:Wzory pt:Ajuda:Guia de edição/Fórmulas TeX ru:Википедия:Формулы sq:Ndihmë:Formula sk:Pomoc:Matematické vzorce sl:Wikipedija:TeXov zapis sr:Википедија:Формуле fi:Ohje:Kaavat sv:Wikipedia:Användarhandledning för TeX tt:Ярдәм:Formul th:วิธีใช้:สูตรคณิตศาสตร์ uk:Довідка:Математичні формули та спецсимволи zh:Help:数学公式